package com.pansoft.openplanet.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.efounder.constant.EnvironmentVariable;
import com.pansoft.openplanet.R;

/**
 * 恢复钱包
 * Created by will on 18-3-20.
 */
@Deprecated
public class RestoreWalletActivity extends TCBaseActivity implements View.OnClickListener {

    private String imUserId, number, userName, password;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.talk_chain_activity_restore_wallet);
        number = getIntent().getExtras().getString("number");
        userName = getIntent().getExtras().getString("userName");
        password = EnvironmentVariable.getPassword();
        ImageView ivBack = (ImageView) findViewById(R.id.iv_back);
        ivBack.setOnClickListener(this);
        TextView tvTitle = (TextView) findViewById(R.id.tv_title);
        tvTitle.setText("恢复基地账户");
        Button tvRestoreWallet = (Button) findViewById(R.id.tv_restore_wallet);
        tvRestoreWallet.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.tv_restore_wallet) {
            Intent intent = new Intent(this, RestoreWalletActivityTwo.class);
            intent.putExtra("userName", userName);
            intent.putExtra("number", number);
            intent.putExtra("avatar", getIntent().getStringExtra("avatar"));

            intent.putExtra(CreateWalletActivity.LAST_ACTIVITY, getIntent().getStringExtra(CreateWalletActivity.LAST_ACTIVITY));
            startActivity(intent);
        } else if (id == R.id.iv_back) {
            finish();
        }
    }
}
